/*******************************************************************************
* Copyright (c) 2010, 2018 西安秦晔信息科技有限公司
* Licensed under the Apache License, Version 2.0 (the "License");
*    you may not use this file except in compliance with the License.
*    You may obtain a copy of the License at
*
*       http://www.apache.org/licenses/LICENSE-2.0
*
*    Unless required by applicable law or agreed to in writing, software
*    distributed under the License is distributed on an "AS IS" BASIS,
*    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*    See the License for the specific language governing permissions and
*    limitations under the License.
*******************************************************************************/
package com.qinyeit.serviceapp.service.members;
import com.qinyeit.serviceapp.entity.BatchCardRecord;
import com.qinyeit.serviceapp.entity.Member;
import com.qinyetech.springstage.core.lang.QyMap;
import com.qinyetech.springstage.core.service.IBaseService;
import com.qinyeit.serviceapp.entity.MemberCard;
import com.sun.org.apache.xpath.internal.operations.Bool;

import java.util.Map;

/** 
 * ClassName: MemberCardService <br/> 
 * Function: 会员卡业务功能 <br/> 
 * date: 2018-12-04 11:15:51 <br/> 
 * 
 * @author liuwenjin
 * @version 1.0
 * @since JDK 1.8
 */
public interface MemberCardService extends IBaseService<MemberCard, Long>{

    /**
     * 批量制卡 保存会员卡
     * @param record
     */
    void saveBatchCard(BatchCardRecord record);

    /**
     * 验证是否有重复的卡号
     * @param cardPre 卡前缀
     * @param startNo 起始编号
     * @param count 卡数量
     * @param exclude 去除尾数
     * @return
     */
    Boolean verifyRepeat(String cardPre,String startNo,Integer count,String exclude,Long merchantGroupId);

    /**
     * 绑定会员 修改会员卡信息
     * @param member
     * @param merchantGroupId
     * @param cardData
     */
    MemberCard bindVip(Member member, Long merchantGroupId, QyMap cardData,MemberCard memberCard);
}